// component/navBar/index.js
var app = getApp();
var applet_park_api_url_imgUrl = app.globalData.applet_park_api_url_imgUrl;

Component({
  /**
   * 组件的属性列表
   */
  properties: {
    title: String,
    back: {
      type: Boolean,
      value: true
    },
    textColor: {
      type: String,
      value: '#fff'
    },
    showNav: {
      type: Boolean,
      value: true
    },
    param: {
      type: Boolean,
      value: false
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    top: 0,
    height: 0,
    left: 10,
    imgUrl: applet_park_api_url_imgUrl,
  },

  /**
   * 组件的方法列表
   */
  methods: {
    navBack: function () {
      wx.navigateBack({
        delta: 1
      })
    },
    backIndex: function () {
      wx.navigateTo({
        url: '/pages/index/index',
      })
    }
  },
  lifetimes: {
    attached: function () {
      this.setData({
        top: app.globalData.navTop,
        height: app.globalData.navHeight,
        left: app.globalData.arrowLeft
      })
    }
  },
})